package com.ybkj.o2o.zhuanche.entity;

import com.ybkj.o2o.zhuanche.common.json.DateTimeJsonSerializer;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;
import java.util.Date;


/**
 * 订单分组.
 * @author hqb
 *
 */
public class OrderGroup implements Serializable {
  private Long id;
  @JsonSerialize(using = DateTimeJsonSerializer.class)
  private Date created;
  @JsonSerialize(using = DateTimeJsonSerializer.class)
  private Date updated;

  private String employIds;

  private Boolean prepay;

  private Boolean treatment;

  private Double payMoney;// 预算的总金额

  private String appKey;

  private static final long serialVersionUID = 1L;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }

  public String getEmployIds() {
    return employIds;
  }

  public void setEmployIds(String employIds) {
    this.employIds = employIds == null ? null : employIds.trim();
  }

  public Boolean getPrepay() {
    return prepay;
  }

  public void setPrepay(Boolean prepay) {
    this.prepay = prepay;
  }

  public Boolean getTreatment() {
    return treatment;
  }

  public void setTreatment(Boolean treatment) {
    this.treatment = treatment;
  }

  public Double getPayMoney() {
    return payMoney;
  }

  public void setPayMoney(Double payMoney) {
    this.payMoney = payMoney;
  }

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey == null ? null : appKey.trim();
  }

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    OrderGroup other = (OrderGroup) that;
    return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
        && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(
            other.getCreated()))
        && (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(
            other.getUpdated()))
        && (this.getEmployIds() == null ? other.getEmployIds() == null : this.getEmployIds()
            .equals(other.getEmployIds()))
        && (this.getPrepay() == null ? other.getPrepay() == null : this.getPrepay().equals(
            other.getPrepay()))
        && (this.getTreatment() == null ? other.getTreatment() == null : this.getTreatment()
            .equals(other.getTreatment()))
        && (this.getPayMoney() == null ? other.getPayMoney() == null : this.getPayMoney().equals(
            other.getPayMoney()))
        && (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(
            other.getAppKey()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
    result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
    result = prime * result + ((getEmployIds() == null) ? 0 : getEmployIds().hashCode());
    result = prime * result + ((getPrepay() == null) ? 0 : getPrepay().hashCode());
    result = prime * result + ((getTreatment() == null) ? 0 : getTreatment().hashCode());
    result = prime * result + ((getPayMoney() == null) ? 0 : getPayMoney().hashCode());
    result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append('[');
    sb.append("Hash = ").append(hashCode());
    sb.append(", id=").append(id);
    sb.append(", created=").append(created);
    sb.append(", updated=").append(updated);
    sb.append(", employIds=").append(employIds);
    sb.append(", prepay=").append(prepay);
    sb.append(", treatment=").append(treatment);
    sb.append(", payMoney=").append(payMoney);
    sb.append(", appKey=").append(appKey);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append(']');
    return sb.toString();
  }
}
